- flash.each do |key,value|
  %div{:id=>'flash_message',:class=> "ui #{key} message flash center aligned segment"}
    = value
:javascript
  $(function(){
    setTimeout(function(){
      $(".ui.flash").closest(".message").addClass('animated fadeOutUp').one('webkitAnimationEnd mozAnimationEnd MSAnimationEnd oanimationend animationend',
      function(){
        $('#flash_message').remove();
      });
    },5000)
  })